﻿@model WebChat.Models.Message
<script type="text/javascript" src="@Url.Content("~/Scripts/tooltip.js")"></script>
<div style="display: none; position: absolute; z-index: 110; left: 400; top: 100;
    width: 15; height: 15" id="preview_div">
</div>
@{
    ViewBag.Title = "Detaljer";
}

<h2>Detaljer</h2>

<fieldset>
    <legend>Melding</legend>

    <div class="display-label">Dato</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Date)
    </div>

    <div class="display-label">Chatroom</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Chatroom)
    </div>

    <div class="display-label">Forfatter</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.name)
    </div>
    @if (Model.imageId != null)
    {
        if (Model.imageType == "image/jpeg" || Model.imageType == "image/png" || Model.imageType == "image/gif" || Model.imageType == "image/bmp")
        {
            <img height="140" width="140" id="img" src="@Url.Action("Image", "Message", new { id = Model.imageId })" alt="my image" onmouseover="showtrail(800, 600,'@Url.Action("Image", "Message", new { id = Model.imageId })')" onmouseout="hidetrail()" />
        }
        <br />
            <a href="../../Message/Download/@Model.imageId">Download: @Model.imageName (@Model.imageSize Kb)</a>
    }
    <div class="display-label">Melding</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Message1)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Tilbake", "ListMessages")
</p>
